package model;
// default package

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Tpayment entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tpayment", catalog = "test")
public class Tpayment implements java.io.Serializable {

	// Fields

	private String id;
	private Treceipt treceipt;
	private String pid;
	private String method;
	private Timestamp createdatetime;
	private Double totalprice;
	private Double collection;
	private Double changes;

	// Constructors

	/** default constructor */
	public Tpayment() {
	}

	/** minimal constructor */
	public Tpayment(String id) {
		this.id = id;
	}

	/** full constructor */
	public Tpayment(String id, Treceipt treceipt, String pid, String method, Timestamp createdatetime, Double totalprice, Double collection, Double changes) {
		this.id = id;
		this.treceipt = treceipt;
		this.pid = pid;
		this.method = method;
		this.createdatetime = createdatetime;
		this.totalprice = totalprice;
		this.collection = collection;
		this.changes = changes;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tid")
	public Treceipt getTreceipt() {
		return this.treceipt;
	}

	public void setTreceipt(Treceipt treceipt) {
		this.treceipt = treceipt;
	}

	@Column(name = "pid")
	public String getPid() {
		return this.pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	@Column(name = "method")
	public String getMethod() {
		return this.method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	@Column(name = "createdatetime", length = 19)
	public Timestamp getCreatedatetime() {
		return this.createdatetime;
	}

	public void setCreatedatetime(Timestamp createdatetime) {
		this.createdatetime = createdatetime;
	}

	@Column(name = "totalprice", precision = 255)
	public Double getTotalprice() {
		return this.totalprice;
	}

	public void setTotalprice(Double totalprice) {
		this.totalprice = totalprice;
	}

	@Column(name = "collection", precision = 255)
	public Double getCollection() {
		return this.collection;
	}

	public void setCollection(Double collection) {
		this.collection = collection;
	}

	@Column(name = "changes", precision = 255)
	public Double getChanges() {
		return this.changes;
	}

	public void setChanges(Double changes) {
		this.changes = changes;
	}

}